class Person{
String name = "张三";
int age = 23;
 
 
 //构造函数 实例化时自动触发
 Person(){
	print("默认构造函数");
 }
 void getinfo(){
	print("${this.name}-----------${this.age}");
 }
 void setinfo(age){
	this.age = age;
 }
}

main(){
	//实例化类
	Person t1 = new Person();
	
	t1.getinfo();
	print(t1.name);
	
	t1.setinfo(50);
	print(t1.age);
}